> # TP Fonctions et polynômes
> 
Exercice 1
> f:=x->exp(-x**2);

> f1:=diff(f(x),x);

> f2:=diff(f1,x);

> factor(%);

> f3:=diff(f2,x);

> factor(%);

> g:=n->factor(diff(f(x),x$n));g(1);

> h:=n->((exp(x**2))*g(n));

> h1:=h(1);

> h2:=h(2);

> h3:=h(3);

> solve(h1);

> solve(h2);

> solve(h3);

> plot([h1,h2,h3],x=-2..2,color=[black,blue,red]);

> int(h3-h2,x=-1..1);

> 
Exercice 2
> h:=n->expand(cos(n*x));

> h1:=h(1);

> h2:=h(2);

> h3:=h(3);

> h4:=h(4);

> h5:=h(5);

> T:=n->subs(cos(x)=X,h(n));

> t1:=T(1);

> t2:=T(2);

> t3:=T(3);

> t4:=T(4);

> t5:=T(5);

> plot([t3,t4,t5],X=-1..1,color=[black,blue,red]);

> solve(t3);

> solve(t4);

> solve(t5);

> 
Exercice 3
> combine(cos(x)**5,trig);

> combine(sin(x)**7,trig);

> 
Exercice 4
> F:=n->sum(k,k=1..n);

> F(10);

> 
Exercice 5
> P:=x->(x**4+(3-4*a)*x**3+(-9*a+6*a**2+2)*x**2+(-4*a**3-4*a+9*a**2)*x+2*a**2-3*a**3+a**4);

> factor(P(x));

> expand(P(x));

> collect(P(x),a);

> a:=-1;

> plot([P(x)],x=-1..1);

> P(1+sqrt(3));

> simplify(P(1+sqrt(3)));

> Int(P(x),x=-1..1)=int(P(x),x=-1..1);

> # FIN !!!
>